package org.cms.dao;

import org.cms.entities.Event;

import javax.ejb.Stateless;
import javax.persistence.Query;
import java.util.List;
import java.util.logging.Logger;

/**
 * Created by elnoa on 19/10/14.
 */
@Stateless(name = "EventDao")
public class EventDao extends AbstractDao<Event,String> implements IDao<Event,String> {


    static Logger log = Logger.getLogger(EventDao.class.getName());

    public List<Event> getAllEvents() {
        Query query = em.createQuery("SELECT e FROM Event e");
        return (List<Event>)query.getResultList();
    }



}
